package com.ruoyi.system.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;

public class FareRecord {
    private String title; // 记录标题
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date timestamp; // 时间戳
    private BigDecimal amount; // 金额

    // 构造函数
    public FareRecord(String title, Date timestamp, BigDecimal amount) {
        this.title = title;
        this.timestamp = timestamp;
        this.amount = amount;
    }

    // Getter 和 Setter 方法
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    // toString 方法，用于打印车费记录信息
    @Override
    public String toString() {
        return "FareRecord{" +
                "title='" + title + '\'' +
                ", timestamp=" + timestamp +
                ", amount=" + amount +
                '}';
    }
}